module.exports = {
  requests: [
    {
      type: 'get',
      url: '/user/list',
      tpl: {
        code: 200,
        message: 'success',
        'data|1-10': [
          {
            'id|+1': 1,
            name: '@CNAME()',
            'age|18-100': 1,
            'sex|1': ['男', '女'],
            email: '@EMAIL()',
            mobile: /^1[356789]\d{9}$/,
            desc: '@CPARAGRAPH()',
            title: '@CTITLE()'
          }
        ]
      }
    },
    {
      type: 'post',
      url: '/user',
      handle(req, res) {
        console.log(req.body, 'req.body')
        const data = Mock.mock({
          code: 200,
          msg: 'success',
          data: {
            id: 1,
            name: 'zs',
            reqBody: req.body
          }
        })
        res.json(data)
      }
    }
  ]
}
